﻿using Nest;

namespace Infrastructure.ElasticSearch.ParentChilds
{
    public class EsMultiSearchSpecification<T>: ISearchSpecification<ISearchRequest<T>> where T : class
    {

        private ISearchRequest<T> _searchDescriptor;

        public EsMultiSearchSpecification(ISearchRequest<T> searchDescriptor)
        {
            _searchDescriptor = searchDescriptor;
        }
        
        public ISearchRequest<T> IsSatisfiedBy()
        {
            return _searchDescriptor;
        }
    }
}